|
|
|
|
|
|
|
Figure 15.9.
The results of a simple Make Table query. |
|
|
|
|
|
|
|
|
In Listing 15.8, you created a database with one table, populated the table with some test data, and then executed a Make Table query that copied the table structure and contents to a new table in the same database. |
|
|
|
|
|
|
|
|
You can use the WHERE clause to limit the rows copied to the new table. Modify SQLVB07.SQV to contain the new SELECT_INTO statement and its corresponding SELECT_FROM, as shown in Listing 15.9. Save the script and execute it. Your results should look similar to those shown in Figure 15.10. |
|
|
|
|
|
|
|
|
Listing 15.9. Using the WHERE clause to limit Make Table queries. |
|
|
|
|
|
|
|
|
//
// sqlvb07.sqv - Testing Make Table Queries
//
// create a database
dbMake sqlvb07.mdb;
// create a base table
CREATE TABLE BaseTable
(CustID TEXT(10) CONSTRAINT PKBaseTable PRIMARY KEY,
CustName TEXT(30),
CustBalance CURRENCY,
CustType TEXT(10),
Notes MEMO
);
// add some data |
|
|
|
|
|